<div class="col-sm-12 mt20" ng-keyup="myKeyup($event)">
<div class="panel panel-default">
<div class="panel-body">
<div class="col-sm-12">

    <div class="row ">
        <div class="col-sm-2">
            <input type="text" class="form-control"  ng-model="info.product_name" placeholder="优惠券产品名称"> 
        </div>
        <div class="col-sm-2 col-sm-offset-6">
            <button class="btn btn-block btn-info" ng-click="search()">搜索</button>
        </div>
        <div class="col-sm-2">
            <button class="btn btn-block btn-info" ng-click="add()">添加</button>
        </div>
    </div>
</div>
</div>
</div>
<!-- searchArea -->

<div class="panel panel-default">
    <div class="panel-body">
        <table class="table table-condensed table-hover table-bordered">
            <thead>
                <tr>
                    <th class="col-md-2 text-center">优惠券产品名称</th>
                    <!--<th class="col-md-2 text-center">优惠券产品状态</th>-->
                    <th class="col-md-2 text-center">库存类型</th>
                    <th class="col-md-1 text-center">库存数量</th>
                    <th class="col-md-2 text-center">最大数量限制</th>
                    <th class="col-md-2 text-center">最大限制数量</th>
                    <th class="col-md-1 text-center">状态</th>
                    <th class="col-md-2 text-center">操作</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="info in a">
                    <td class="text-center">{{info.product_name}}</td>
                    <!--<td class="text-center">
                        <p class="" ng-show="info.STATUS == '0'">下架</p >
                        <p class="" ng-show="info.STATUS == '1'">上架</p >
                    </td>-->
                    <td class="text-center">
                        <p class="" ng-show="info.stock_type == '0'">不启用</p >
                        <p class="" ng-show="info.stock_type == '1'">启用</p >
                    </td>
                    <td class="text-center">{{info.stock_num}}</td>
                    <td class="text-center">
                        <p class="" ng-show="info.max_limit == '-1'">不启用</p >
                        <p class="" ng-show="info.max_limit == '0'">启用</p >
                    </td>
                    <td class="text-center">{{info.max_limit_num}}</td>
                    <td class="text-center">
                        <p class="" ng-show="info.STATUS == '0'">草稿</p>
                        <p class="" ng-show="info.STATUS == '1'">已上架</p>
                        <p class="" ng-show="info.STATUS == '2'">已下架</p>
                    </td>
                    <td class="text-center">
                    	<a ng-show="info.STATUS == '0' || info.STATUS == '2'" ng-click="online(info.CODE)" class="btn btn-primary btn-xs">上架</a>
                    	<a ng-show="info.STATUS == '1'" ng-click="offline(info.CODE)" class="btn btn-success btn-xs">下架</a>
                    	<a ng-click="edit(info.CODE, info.STATUS)" class="btn btn-info btn-xs">编辑</a>
        	            <a ng-click="del(info.CODE, info.id)" class="btn btn-danger btn-xs">删除</a>
                    </td>
                </tr>
            </tbody>
        </table>
        <div class="text-right">
             <pagination total-items="bigTotalItems" ng-model="bigCurrentPage" ng-change="search()" previous-text="上一页" next-text="下一页"
                first-text="首页" last-text="尾页" max-size="maxSize" boundary-links="true" rotate="false" items-per-page="itemsPerPage"
                class="m-t-none m-b">
            </pagination>
        </div>
    </div>
</div>

</div>
